<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: zhang_yao_wu1993
  Date: 15/4/21
  Time: 下午4:34
--%>
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title></title>
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script type="text/javascript" src="/Other/Lib/jquery-2.1.3.js"></script>
    <script type="text/javascript" src="/Other/Lib/ParticleGround/jquery.particleground.min.js"></script>
    <link rel="stylesheet" href="/Other/Lib/ParticleGround/jquery.particleground.css"/>
    <script type="text/javascript" src="/Other/Lib/SemanticUI/dist/semantic.min.js"></script>
    <link rel="stylesheet" href="/Other/Lib/SemanticUI/dist/components/form.min.css"/>
    <link rel="stylesheet" href="/Other/Lib/SemanticUI/dist/components/button.min.css"/>
    <link rel="stylesheet" href="/Other/Lib/SemanticUI/dist/components/input.min.css"/>
    <link rel="stylesheet" href="/Other/Lib/SemanticUI/dist/components/segment.min.css"/>
    <link rel="stylesheet" href="/Other/Lib/SemanticUI/dist/components/icon.min.css"/>
    <link rel="stylesheet" href="/Other/Lib/SemanticUI/dist/components/label.min.css"/>
    <link rel="stylesheet" href="/Other/Lib/SemanticUI/dist/components/statistic.min.css"/>
    <link rel="stylesheet" href="/Other/Lib/SemanticUI/dist/components/dropdown.min.css"/>
    <link rel="stylesheet" href="/Other/Lib/SemanticUI/dist/components/menu.min.css"/>
    <link rel="stylesheet" href="/Other/Lib/SemanticUI/dist/components/transition.min.css"/>
    <link rel="stylesheet" href="/Other/Lib/SemanticUI/dist/components/modal.min.css"/>
    <link rel="stylesheet" href="/Other/Lib/SemanticUI/dist/components/dimmer.min.css"/>


    <script type="text/javascript" src="/Other/JavaScript/blog_Upload.js"></script>
    <link rel="stylesheet" href="/Other/StyleSheet/blog_Upload.css"/>
</head>
<body>
<div id="particles">
    <%-- upload_title --%>
    <div id="upload_title" class="ui statistics">
        <div class="yellow statistic">
            <div class="value">
                上传文章
            </div>
            <div class="label">

            </div>
        </div>
    </div>
    <%-- end upload_title --%>
    <%-- upload_box --%>
    <div id="upload_box" class="ui large form segment">
        <form id="add_article_form" action="/AddArticle?${_csrf.parameterName}=${_csrf.token}" method="post" enctype="multipart/form-data">
            <div class="ui vertical segment">
                <div class="ui left icon input labeled">
                    <input type="text" placeholder="请输入文章标题 ..." maxlength="45" name="title">
                    <i class="bookmark icon"></i>

                    <div class="ui tag label">
                        <i class="terminal icon"></i>
                    </div>
                </div>
            </div>
            <div class="ui vertical segment">
                <div class="ui selection dropdown">
                    <input type="hidden" name="categoryId" value="-1">

                    <div class="default text"></div>
                    <i class="dropdown icon"></i>

                    <div class="menu">
                        <c:forEach var="item" items="${blogUploadPageVo.blogCategoryList}">
                            <div class="item" data-value="${item.id}">${item.category}</div>
                        </c:forEach>
                    </div>
                </div>
                <%-- add category modal --%>
                <div id="add_category_modal_show_button" class="ui button large">
                    添加类别
                </div>
                <div id="add_category_modal" class="ui modal">
                    <i class="close icon"></i>

                    <div class="ui fluid form segment">
                        <div class="field">
                            <label>类别</label>
                            <input placeholder="Category" type="text">
                        </div>
                        <div id="add_category_submit_button" class="ui submit button">提交</div>
                    </div>
                </div>
                <%-- end add category modal --%>
            </div>
            <div class="ui vertical segment">
                <div class="ui left icon input labeled">
                    <input type="file" name="file">
                    <i class="upload icon"></i>

                    <div class="ui tag label">
                        <i class="terminal icon"></i>
                    </div>
                </div>
            </div>
            <div class="ui vertical segment">
                <div id="submit_button" class="ui basic button">
                    <i class="angle double right icon"></i>
                    提交
                </div>
                <a href="/MainPage">
                    <div class="ui basic button">
                        <i class="home icon"></i>
                        返回首页
                    </div>
                </a>
            </div>
        </form>
    </div>
    <%-- end upload_box --%>
    <form id="add_category_form" hidden="hidden" action="/AddCategory" method="post" target="_self">
        <input type="text" hidden="hidden" name="category"/>
        <input type="hidden"
               name="${_csrf.parameterName}"
               value="${_csrf.token}"/>
    </form>
</div>
</body>
</html>